package com.wumai.keystrokes;

import com.wumai.keystrokes.config.Common;
import com.wumai.keystrokes.gui.KeystrokesConfigScreen;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.ExtensionPoint;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;

@Mod(Common.MOD_ID)
public class KeyStrokesMod {
    
    public KeyStrokesMod() {
        // 注册事件监听器
        MinecraftForge.EVENT_BUS.register(this);
        // 注册配置界面工厂
        ModLoadingContext.get().registerExtensionPoint(
                ExtensionPoint.CONFIGGUIFACTORY,
                () -> (Minecraft mc, Screen screen) -> new KeystrokesConfigScreen(screen)
        );
    }
}